<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class xiangqi</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
						<script src="../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../media/images/plus.png";
				imgMinus.src = "../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class xiangqi</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Represents the game</p>
		<p class="notes">
			Located in <a class="field" href="_stretchqilib---xiangqi.php.html">/stretchqilib/xiangqi.php</a> (line <span class="field"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a34">34</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$pieceMap" title="details" class="var-name">$pieceMap</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$playerPieces" title="details" class="var-name">$playerPieces</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$sNotationType" title="details" class="var-name">$sNotationType</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																														
				<div class="method-definition">
											<span class="method-result">xiangqi</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#applyMove" title="details" class="method-name">applyMove</a>
											(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../stretchqi/move.html">object move</a></span>
										<a href="#findMovePiece" title="details" class="method-name">findMovePiece</a>
											(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../stretchqi/notation.html">object notation</a></span>
										<a href="#getNotation" title="details" class="method-name">getNotation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$sType</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../stretchqi/renderer.html">object renderer</a></span>
										<a href="#getRenderer" title="details" class="method-name">getRenderer</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$sType</span> = <span class="var-default">'table'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sNotationType</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isValid" title="details" class="method-name">isValid</a>
											(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#parseNotation" title="details" class="method-name">parseNotation</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sText</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sType</span> = <span class="var-default">'1'</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#reset" title="details" class="method-name">reset</a>
										()
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$pieceMap" id="$pieceMap"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$pieceMap</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a52">52</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array of pieceinfo objects representing current positions of pieces on board</p>
	
	
		
		

</div>
<a name="var$playerPieces" id="$playerPieces"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$playerPieces</span>
			 = <span class="var-default">array('Red' =&gt; array(),'Black'=&gt;array())</span>			(line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a40">40</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array of pieceinfo objects representing all pieces foreach color(including taken ones)</p>
	
	
		
		

</div>
<a name="var$sNotationType" id="$sNotationType"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$sNotationType</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a46">46</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">the fist used notation for this board, there after taken to be the default</p>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a55">55</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">xiangqi</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodapplyMove" id="applyMove"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">applyMove</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a136">136</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">apply one move to the board</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			applyMove
		</span>
					(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>
				<span class="var-name">$oMove</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfindMovePiece" id="findMovePiece"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">findMovePiece</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a111">111</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">find the piece being refered to in the move in the clors peice list</p>
	<ul class="tags">
				<li><span class="field">return:</span> object with its piece id set</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../stretchqi/move.html">object move</a></span>
		<span class="method-name">
			findMovePiece
		</span>
					(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>
				<span class="var-name">$oMove</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetNotation" id="getNotation"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getNotation</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a64">64</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result"><a href="../stretchqi/notation.html">object notation</a></span>
		<span class="method-name">
			getNotation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$sType</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$sType</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetRenderer" id="getRenderer"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getRenderer</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a247">247</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get a renderer object and set it with current notation</p>
	
	<div class="method-signature">
		<span class="method-result"><a href="../stretchqi/renderer.html">object renderer</a></span>
		<span class="method-name">
			getRenderer
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$sType</span> = <span class="var-default">'table'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sNotationType</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sType</span><span class="var-description">: type of renderer</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sNotationType</span><span class="var-description">: type of notation</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisValid" id="isValid"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isValid</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a154">154</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">is this move valid</p>
	<ul class="tags">
				<li><span class="field">todo:</span> do checking</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isValid
		</span>
					(<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>&nbsp;<span class="var-name">$oMove</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../stretchqi/move.html">object move</a></span>
				<span class="var-name">$oMove</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseNotation" id="parseNotation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">parseNotation</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a79">79</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parse notation into array of move objects</p>
	<ul class="tags">
				<li><span class="field">return:</span> array of move objects</li>
				<li><span class="field">see:</span> <a href="../stretchqi/move.html">move</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			parseNotation
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sText</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sType</span> = <span class="var-default">'1'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sText</span><span class="var-description">: notation to parse</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sType</span><span class="var-description">: notation type (they live in the notations folder)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodreset" id="reset"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">reset</span> (line <span class="line-number"><a href="../__filesource/fsource_stretchqi__stretchqilibxiangqi.php.html#a162">162</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">set the games state back to standard starting postions</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			reset
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 12 Jan 2010 10:19:00 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>